﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage/User.Master"
    CodeBehind="Home.aspx.vb" Inherits="GoodAnotApp.Home" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <meta content="charset=utf-8">
    <style type="text/css">
        .style3
        {
            width: 870px;
        }
        .imageFrontPage
        {
            margin-left: 18px;
            border: 1px solid #DDD;
            opacity: 0.3;
            filter: alpha(opacity=50);
            -webkit-transition: opacity 1s linear;
        }
        .tdNoSpacing
        {
            padding: 0px 0px 0px 0px;
            margin: 0px 0px 0px 0px;
            border-top: 0px;
        }
        
        .imageFrontPage:hover
        {
            opacity: 1;
            filter: alpha(opacity=100);
            -webkit-transition: opacity 1s linear;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="Styles/flexslider.css" />
    <script type="text/javascript" src="Scripts/jquery.flexslider.js"></script>
    <%-- <script type="text/javascript" src="Scripts/jquery.flexslider-min.js"></script>--%>
    <script type="text/javascript">
        $(window).load(function () {
            $('.flexslider').flexslider({
                slideshow: true,
                randomize: false,
                slideshowspeed: 1000,
                animationDuration: 600,
                animation: "slide",
                controlsContainer: ".flex-container",
                after: function () {
                    PageMethods.triggerChangeImage(this);
                }

            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="hidden field container">
        <asp:HiddenField ID="HiddenField1" runat="server" />
        <asp:HiddenField ID="HiddenField2" runat="server" />
        <asp:HiddenField ID="HiddenField3" runat="server" />
        <asp:HiddenField ID="HiddenField4" runat="server" />
        <asp:HiddenField ID="HiddenField5" runat="server" />
        <asp:HiddenField ID="HiddenField6" runat="server" />
    </div>
    <%--Facebook plugin--%>
    <div id="fb-root">
    </div>
    <script type="text/javascript">
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        } (document, 'script', 'facebook-jssdk'));
    </script>
    <%--end facebook plugin--%>
    <div id="content" runat="server">
        <div id="container">
            <!--=============================
		Markup for FADE animation
		=================================-->
            <div class="flex-container" runat="server">
                <div class="flexslider" runat="server">
                    <ul class="slides" id="imageSlides" runat="server">
                        <li>
                            <asp:ImageButton ID="imgAdvertisement1" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/Zirca.png" Width="100%" Height="100%" />
                            <p class="flex-caption">
                                This image is wrapped in a link!</p>
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement2" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/Mavis2.png" Width="100%" Height="100%" />
                            <p class="flex-caption">
                                This image is wrapped in a link!</p>
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement3" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/Mr.Bean2.png" Width="100%" Height="100%" />
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement4" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/QianHu2.png" Width="100%" Height="100%" />
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement5" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/ToniAndGuy.png" Width="100%" Height="100%" />
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement6" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/Forever21.png" Width="100%" Height="100%" />
                        </li>
                        <li>
                            <asp:ImageButton ID="imgAdvertisement7" runat="server" Style="margin: 0px 0px 0px 0px;
                                padding: 0px 0px 0px 0px" ImageUrl="images/Banner.png" Width="100%" Height="100%" />
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <table>
            <tr>
                <td colspan="2">
                    <h3 style="color: #D12026">
                        Companies</h3>
                </td>
            </tr>
            <tr>
                <td width="600px" class="style3" colspan="2">
                    <div>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <table width="100%">
                                    <tr>
                                        <td style="border-top: 0px" width="754px">
                                            <asp:LinkButton ID="lbImagePopular" Style="margin-left: 15px" runat="server" Font-Bold="True">Most popular</asp:LinkButton>
                                        </td>
                                        <td style="border-top: 0px" align="right" width="auto">
                                            <asp:LinkButton ID="lbImageNewest" Style="right: 0px" runat="server" Font-Bold="True">Newest</asp:LinkButton>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="border-top: 0px" style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px">
                                            <table>
                                                <tr>
                                                    <td class="tdNoSpacing">
                                                        <asp:ImageButton ID="imageFront1" class="imageFrontPage" runat="server" Height="170px"
                                                            Width="250px" />
                                                    </td>
                                                    <td class="tdNoSpacing">
                                                        <asp:ImageButton ID="imageFront2" class="imageFrontPage" runat="server" Height="170px"
                                                            Width="250px" />
                                                    </td>
                                                    <td class="tdNoSpacing">
                                                        <asp:ImageButton ID="imageFront3" class="imageFrontPage" runat="server" Height="170px"
                                                            Width="250px" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdNoSpacing">
                                                        <asp:LinkButton ID="lbImageFront1" Style="margin-left: 18px; border-top: 0px" runat="server">LinkButton</asp:LinkButton>
                                                    </td>
                                                    <td class="tdNoSpacing">
                                                        <asp:LinkButton ID="lbImageFront2" Style="margin-left: 18px; border-top: 0px" runat="server">LinkButton</asp:LinkButton>
                                                    </td>
                                                    <td class="tdNoSpacing">
                                                        <asp:LinkButton ID="lbImageFront3" Style="margin-left: 18px; border-top: 0px" runat="server">LinkButton</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="border-top: 0px">
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="lbImagePopular" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="lbImageNewest" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="600px" id="Latest Reviews">
                        <tr>
                            <td style="border-top: 0px">
                                <h3 style="color: #D12026">
                                    Latest Reviews</h3>
                            </td>
                        </tr>
                        <tr>
                            <td style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; border-top: 0px">
                                <asp:ListView ID="lvLatestReviews" runat="server" DataSourceID="SqlDataSourceListViewLatest">
                                    <EditItemTemplate>
                                        <span style="">review_ID:
                                            <asp:Label ID="review_IDLabel1" runat="server" Text='<%# Eval("review_ID") %>' />
                                            <br />
                                            display_name:
                                            <asp:TextBox ID="display_nameTextBox" runat="server" Text='<%# Bind("display_name") %>' />
                                            <br />
                                            review_content:
                                            <asp:TextBox ID="review_contentTextBox" runat="server" Text='<%# Bind("review_content") %>' />
                                            <br />
                                            date_created:
                                            <asp:TextBox ID="date_createdTextBox" runat="server" Text='<%# Bind("date_created") %>' />
                                            <br />
                                            user_ID:
                                            <asp:Label ID="user_IDLabel1" runat="server" Text='<%# Eval("user_ID") %>' />
                                            <br />
                                            businessName:
                                            <asp:TextBox ID="businessNameTextBox" runat="server" Text='<%# Bind("businessName") %>' />
                                            <br />
                                            outletName:
                                            <asp:TextBox ID="outletNameTextBox" runat="server" Text='<%# Bind("outletName") %>' />
                                            <br />
                                            outlet_ID:
                                            <asp:Label ID="outlet_IDLabel1" runat="server" Text='<%# Eval("outlet_ID") %>' />
                                            <br />
                                            title:
                                            <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                                            <br />
                                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                                            <br />
                                            <br />
                                        </span>
                                    </EditItemTemplate>
                                    <EmptyDataTemplate>
                                        <span>No data was returned.</span>
                                    </EmptyDataTemplate>
                                    <InsertItemTemplate>
                                        <span style="">display_name:
                                            <asp:TextBox ID="display_nameTextBox" runat="server" Text='<%# Bind("display_name") %>' />
                                            <br />
                                            review_content:
                                            <asp:TextBox ID="review_contentTextBox" runat="server" Text='<%# Bind("review_content") %>' />
                                            <br />
                                            date_created:
                                            <asp:TextBox ID="date_createdTextBox" runat="server" Text='<%# Bind("date_created") %>' />
                                            <br />
                                            businessName:
                                            <asp:TextBox ID="businessNameTextBox" runat="server" Text='<%# Bind("businessName") %>' />
                                            <br />
                                            outletName:
                                            <asp:TextBox ID="outletNameTextBox" runat="server" Text='<%# Bind("outletName") %>' />
                                            <br />
                                            title:
                                            <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                                            <br />
                                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                                            <br />
                                            <br />
                                        </span>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <table class="bordered-table">
                                            <tr>
                                                <td rowspan="2" style="border-right: 0px; padding: 5px 0px 3px 5px" width="105px">
                                                    <asp:Image ID="imgProfile" Height="60px" Width="60px" runat="server" />
                                                </td>
                                                <td style="border-left: 0px; padding-top: 5px; padding-bottom: 4px" width="100%">
                                                    <asp:LinkButton ID="lbOutletLink" Text='<%# string.concat(Eval("businessName")," - ",Eval("outletName") ) %>'
                                                        runat="server" PostBackUrl='<%# string.concat("OutletReview.aspx?id=",Eval("outlet_ID") )%>' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td rowspan="2" style="border-left: 0px; border-top: 0px" width="100%">
                                                    <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' Font-Bold="True"
                                                        Font-Size="12px" Font-Names="Calibri (Body)" />
                                                    <br>
                                                    <asp:Label ID="review_contentLabel" runat="server" Font-Size="12px" Text='<%# Eval("review_content") %>'
                                                        ForeColor="#77787B" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="border-top: 0px; padding-top: 1px">
                                                    <asp:LinkButton ID="lbProfile" Text='<%# Eval("display_name") %>' runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                    <LayoutTemplate>
                                        <div style="" id="itemPlaceholderContainer" runat="server">
                                            <span runat="server" id="itemPlaceholder" />
                                        </div>
                                        <div style="">
                                        </div>
                                    </LayoutTemplate>
                                    <SelectedItemTemplate>
                                        <span style="">review_ID:
                                            <asp:Label ID="review_IDLabel" runat="server" Text='<%# Eval("review_ID") %>' />
                                            <br />
                                            display_name:
                                            <asp:Label ID="display_nameLabel" runat="server" Text='<%# Eval("display_name") %>' />
                                            <br />
                                            review_content:
                                            <asp:Label ID="review_contentLabel" runat="server" Text='<%# Eval("review_content") %>' />
                                            <br />
                                            date_created:
                                            <asp:Label ID="date_createdLabel" runat="server" Text='<%# Eval("date_created") %>' />
                                            <br />
                                            user_ID:
                                            <asp:Label ID="user_IDLabel" runat="server" Text='<%# Eval("user_ID") %>' />
                                            <br />
                                            businessName:
                                            <asp:Label ID="businessNameLabel" runat="server" Text='<%# Eval("businessName") %>' />
                                            <br />
                                            outletName:
                                            <asp:Label ID="outletNameLabel" runat="server" Text='<%# Eval("outletName") %>' />
                                            <br />
                                            outlet_ID:
                                            <asp:Label ID="outlet_IDLabel" runat="server" Text='<%# Eval("outlet_ID") %>' />
                                            <br />
                                            title:
                                            <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                                            <br />
                                            <br />
                                        </span>
                                    </SelectedItemTemplate>
                                </asp:ListView>
                                <asp:SqlDataSource ID="SqlDataSourceListViewLatest" runat="server" ConnectionString="<%$ ConnectionStrings:yijungoodAnotDBConnectionString %>"
                                    SelectCommand="SELECT TOP (3) review.review_ID, user_account.display_name, review.review_content, review.date_created, user_account.user_ID, business.name AS businessName, outlet.name AS outletName, outlet.outlet_ID, review.title FROM review INNER JOIN user_account ON review.reviewer_ID = user_account.user_ID INNER JOIN outlet ON review.outlet_ID = outlet.outlet_ID AND review.outlet_ID = outlet.outlet_ID INNER JOIN business ON outlet.business_ID = business.business_ID ORDER BY review.date_created DESC">
                                </asp:SqlDataSource>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <table width="350px" id="Most Searched">
                        <tr>
                            <td colspan="2" style="border-top: 0px">
                                <h3 style="color: #D12026">
                                    Popular searches</h3>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:LinkButton class="lbSlide" ID="lbSearch1" runat="server">LinkButton</asp:LinkButton>
                            </td>
                            <td>
                                <asp:LinkButton class="lbSlide" ID="lbSearch2" runat="server">LinkButton</asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch3" runat="server">LinkButton</asp:LinkButton>
                            </td>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch4" runat="server">LinkButton</asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch5" runat="server">LinkButton</asp:LinkButton>
                            </td>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch6" runat="server">LinkButton</asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch7" runat="server">LinkButton</asp:LinkButton>
                            </td>
                            <td style="border-top: 0px">
                                <asp:LinkButton class="lbSlide" ID="lbSearch8" runat="server">LinkButton</asp:LinkButton>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="border-top: 0px">
                                <div class="fb-like-box" data-href="http://www.facebook.com/pages/Good-Anot/184584804974397"
                                    data-width="340" data-height="260" data-show-faces="true" data-stream="true"
                                    data-header="true">
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
